Telegram Group & Telegram Channel
Walrus operator:

The Walrus or := operator is one of the latest additions to python 3.8.
It is an assignment operator that lets you assign value to a variable within an expression like conditional statements, loops, etc.


Example

If we want to check and print the length of a list:

Mylist = [1,2,3]
if(l := len(mylist) > 2)
print(l)


Output

3

Share and Support
@Python_Codes



tg-me.com/python_codes/221
Create:
Last Update:

Walrus operator:

The Walrus or := operator is one of the latest additions to python 3.8.
It is an assignment operator that lets you assign value to a variable within an expression like conditional statements, loops, etc.


Example

If we want to check and print the length of a list:

Mylist = [1,2,3]
if(l := len(mylist) > 2)
print(l)


Output

3

Share and Support
@Python_Codes

BY Python Codes


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/python_codes/221

View MORE
Open in Telegram


Python Codes Telegram | DID YOU KNOW?

Date: |

A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.

Why Telegram?

Telegram has no known backdoors and, even though it is come in for criticism for using proprietary encryption methods instead of open-source ones, those have yet to be compromised. While no messaging app can guarantee a 100% impermeable defense against determined attackers, Telegram is vulnerabilities are few and either theoretical or based on spoof files fooling users into actively enabling an attack.

Python Codes from cn


Telegram Python Codes
FROM USA